home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / BBS / MUBBS / MUBBS etc.cpt / Module Source / Serial Module code / Hook Stuff.h < prev    next >
Text File  |  1991-11-04  |  454b  |  22 lines

  1. /* this is stuff so that we can call routines in a CODE Resource
  2.  * with a pointer. It's faster than calling the resource through
  3.  * the resource manager, that's why we do this !
  4. */
  5.  
  6.  
  7. static
  8. __storeA4()
  9. {
  10.     asm {
  11.         bsr.s    @1
  12.         dc.l    0            ;  store A4 here
  13. @1        move.l    (sp)+,a1
  14.     }
  15. }
  16.  
  17.  
  18. #define storeA4()    __storeA4(); asm { move.l a4,(a1) }
  19.  
  20. #define getA4()        asm { move.l a4,-(sp) } __storeA4(); asm { move.l (a1),a4 }
  21. #define getoldA4()        asm { move.l (sp)+,a4 }
  22.